<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<!DOCTYPE html>
<html>
<head>
    <title>供应商列表 - 后台管理</title>
    <meta charset="utf-8"/>
    <link rel="stylesheet" type="text/css" href="/css/admin.css"/>
</head>
<body>
<div class="container">
    <div id="header">
        <jsp:include page="header.jsp"/>
    </div>
    <div id="admin_left">
        <ul class="submenu">
            <jsp:include page="left.jsp"/>
        </ul>
        <div id="copyright"></div>
    </div>

    <div id="admin_right">
        <div class="content_box">
            <div class="content">
                <div class="title_bar">
                    <h3>供应商列表</h3>
                    <a href="/admin/supplier/add" class="oper_btn"><span>+ 添加供应商</span></a>
                </div>

                <div class="table_container">
                    <table class="border_table">
                        <colgroup>
                            <col width="80px">
                            <col width="200px">
                            <col width="150px">
                            <col width="150px">
                            <col width="80px">
                            <col width="150px">
                        </colgroup>
                        <thead>
                        <tr>
                            <th>ID</th>
                            <th>名称</th>
                            <th>联系人</th>
                            <th>电话</th>
                            <th>状态</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <c:forEach items="${suppliers}" var="s">
                            <tr>
                                <td class="td_c">${s.id}</td>
                                <td>${s.name}</td>
                                <td>${s.contact}</td>
                                <td>${s.phoneNumber}</td>
                                <td>${s.status}</td>
                                <td class="td_c">
                                    <a href="/admin/supplier/edit?id=${s.id}">
                                        <img class="operator" src="/images/admin/icon_edit.gif" alt="编辑"/>
                                    </a>
                                    <a href="javascript:void(0)" onclick="if(confirm('确定删除吗？')) location.href='/admin/supplier/delete?id=${s.id}'">
                                        <img class="operator" src="/images/admin/icon_del.gif" alt="删除"/>
                                    </a>
                                </td>

                            </tr>
                        </c:forEach>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
    <div id="separator"></div>
</div>
</body>
</html>
